CMAKE_MINIMUM_REQUIRED(VERSION 2.6)

PROJECT(Hilbert_curve)

FIND_PACKAGE(OpenGL REQUIRED)
IF(NOT OPENGL_FOUND)
  MESSAGE(FATAL_ERROR "Error : OpenGL Libraries not found")
ENDIF(NOT OPENGL_FOUND)

FIND_PACKAGE(GLEW REQUIRED)
IF(NOT GLEW_FOUND)
  MESSAGE(FATAL_ERROR "Error : GLEW Libraries not found")
ENDIF(NOT GLEW_FOUND)

FIND_PACKAGE(GLUT REQUIRED)
IF(NOT GLUT_FOUND)
  MESSAGE(FATAL_ERROR "Error : GLUT Library not found")
ENDIF(NOT GLUT_FOUND)

add_executable(hilbert.out hilbert_curve.cpp)
INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR}  ${GLUT_INCLUDE_DIR} ${GLEW_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR}/Common)
target_link_libraries(hilbert.out ${OPENGL_LIBRARIES} ${GLUT_LIBRARIES} ${GLEW_LIBRARIES} lsystem shader)
install(TARGETS hilbert.out RUNTIME DESTINATION bin)

